package com.sxtbbs.service;

import java.util.ArrayList;
import java.util.List;

import com.sxtbbs.bean.ProvCity;
import com.sxtbbs.dao.UserDao;
import com.sxtbbs.util.UserDaoFactory;

public class DwrService {
	
	private UserDao userDao = UserDaoFactory.getUserDao();
	
	public boolean checkUname(String uname) {
		boolean checkState = false;
		if(userDao.getUser(uname) != null) {
			checkState = true;
			return checkState;
		}
		return checkState;
	}
	
	public List<ProvCity> listProv() {
		List<ProvCity> listProv = new ArrayList<ProvCity>();
		listProv = userDao.getProv();
		return listProv;
	}
	
	public List<ProvCity> listCity(String proid) {
		List<ProvCity> listCity = new ArrayList<ProvCity>();
		listCity = userDao.getCity(proid);
		return listCity;
	}
}
